Creating custom transformations
Previous  Top  Next



To create your own transformation effect, choose Effects->Transformations->New from the main menu.

You will see the following screen:

custom_transformations

Here you can select up to 6 constants (transformation parameters), name them and specify default values. When you apply the transformation, you will see the appropriate number of sliders - one for each parameter. It is recommended to pick such default values which do not make any changes to the image.

Parameter value sliders let you change constants from 0 to 100.

Tip: If you need, for instance, to get a parameter in interval 7..11, use an expression like (a/25+7).

Tip: It is highly advised to enclose all expressions with constants in brackets. In this case expressions will be calculated once per the transformation and not for each pixel separately.

Choose the coordinate system (Cartesian or Polar) and enter a formula for it.

You can choose whether the defined coordinates will be a source or a destination. This allows you to create reverse transformations with a simple switch.

Click the Test button to test the transformation on the current image. No actual change will be applied to the image.

When you have finished tuning and testing your transformation, click Add to save it.

To delete a custom transformation, choose Effects-> Transformations-> Delete from the main menu, pick the transformation you want to delete from the pull-down list and click "OK".

Constants, functions and operators

Constants

Cartesian
w width of active region;
h height of active region;
cx =x-w/2 - horizontal coordinate of region center;
cy =y-h/2 - vertical coordinate of region center.
Polar
r distance from center to a point;
t angle.

Functions and Operators

+ addition;
- subtraction;
* multiplication;
/ division;
sin() sine;
cos() cosine;
sqr(), sqrt() square root;
abs() absolute value;
int() integer part;
random() random value (0..arg)

Note:random() function is calculated separately for each pixel even if the argument does not depend on {cx,cy,x,y,r,t}.